<!DOCTYPE HTML>
<html>
<head>
<script>
	window.onload = function(){
		var canvas = document.getElementById("myCanvas");
		var context = canvas.getContext("2d");
		
		var rectWidth = 150;
		var rectHeight = 75;
		
		// 1 0 tx
		// 0 1 ty
		// 0 0 1
		var tx = canvas.width / 2;
		var ty = canvas.height / 2;
		
		//context.transform(1, 0, 0, 1, tx, ty);
		
		var sx = 0.75;
		var sy = 0.75;
		context.translate(canvas.width / 2, canvas.height / 2);
		context.transform(1, sy, sx, 1, 0, 0);
		
		context.filLStyle = "blue";
		context.fillRect(-rectWidth / 2, -rectHeight / 2, rectWidth, rectHeight);
	}
</script>
</head>
<body>
	<canvas id="myCanvas" width="800" height="500" style="border:1px solid black;">
	</canvas>
</body>
</html>